package di

import (
	"fmt"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/area"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/menu"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/msg"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/org"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/permission"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/profit"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/role"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/site"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/user"
	userRepo "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/user"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/business_opportunity/contact"
	opptyStatusRepo "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/business_opportunity/oppty_status"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/business_opportunity/order"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/business_opportunity/strategic_monitor"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/business_opportunity/subscription/push_config"
	pushLogRepo "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/business_opportunity/subscription/push_log"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/business_opportunity/subscription/radar"
	clueRepo "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/clue/clue"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/clue/crm/gfyx_crm_config"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/clue/crm/gfyx_crm_relation"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/clue/customer"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/clue/report"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/common/file"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/common/form"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/common/sms"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/job_center"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/market/outbound_account"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/market/outbound_crowd"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/market/outbound_rcc_project"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/market/outbound_task"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/remote/baiying_remote"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/remote/bigdata_remote"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/remote/gfyx_user_service_remote"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/remote/openapi_remote"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/remote/opensearch_remote"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/remote/ycg_remote"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/rpa"
)

func (c *Inject) InjectRepo() {
	repos := []interface{}{
		report.NewGfyxReportFollowRecordRepos,
		gfyx_user_service_remote.NewGfyxUserServiceRepository,
		report.NewGfyxReportRepos,
		baiying_remote.NewBaiYingRepository,
		bigdata_remote.NewBigDataServiceRepo,
		contact.NewOpTelViewHistoryRepos,
		customer.NewCustomerManageRepository,
		customer.NewCustomerImportRepository,
		customer.NewCustomerRepo,
		customer.NewGfyxCustomerPoolImportRepo,
		customer.NewGfyxCustomerPoolRepo,
		clueRepo.NewClueRepo,
		file.NewFileRepository,
		form.NewFormRepo,
		job_center.NewJobCenterRepository,
		gfyx_crm_config.NewGfyxCrmConfigRepos,
		gfyx_crm_relation.NewGfyxCrmRelationRepos,
		opptyStatusRepo.NewOpptyStatusHistoryRepos,
		opptyStatusRepo.NewOpptyStatusRepos,
		openapi_remote.NewCompanyRepo,
		opensearch_remote.NewOpenSearchRepository,
		outbound_account.NewOutboundAccountRepository,
		outbound_crowd.NewOutboundCrowdRepos,
		outbound_task.NewOutBoundRepository,
		outbound_rcc_project.NewOutBoundRccProjectRepository,
		profit.NewProfitRepository,
		pushLogRepo.NewGfyxRadarSubscriptionPushLogRepos,
		push_config.NewSubscriptionPushConfigRepos,
		radar.NewRadarSubscriptionConfigRepos,
		rpa.NewRpaRepository,
		site.NewSiteRepository,
		sms.NewSmsCodeRepository,
		userRepo.NewLoginRepository,
		userRepo.NewUserBehaviorRepository,
		userRepo.NewUserBindRepos,
		user.NewUserOrgRepository,
		user.NewUserRepository,
		user.NewUserRoleRepository,
		ycg_remote.NewYcgRepository,
		area.NewAreaConfigRepository,
		menu.NewMenuRepository,
		org.NewOrgRepository,
		msg.NewMsgRepository,
		permission.NewPermissionRepository,
		role.NewRoleRepository,
		order.NewOrderRepository,
		strategic_monitor.NewStrategicMonitorRepo,
	}
	var errs []error
	for _, constructor := range repos {
		err := c.Provide(constructor)
		if err != nil {
			errs = append(errs, err)
		}
	}
	fmt.Printf("InjectRepo errors:%+v\n", errs)
}
